<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Data Structures for Sets and Graphs: datastruct/OrderedBinaryRelation.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Data Structures for Sets and Graphs
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.1.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Macros</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_f9af7c4329e6f916a6a58dc83cbb7ef1.html">datastruct</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">OrderedBinaryRelation.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="OrderedBinaryRelation_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * OrderedBinaryRelation.h</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> *  Created on: 01/09/2012</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> *      Author: marcio</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;</div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#ifndef ORDEREDBINARYRELATION_H_</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define ORDEREDBINARYRELATION_H_</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#include &quot;OrderedSet.h&quot;</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;</div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a name="l00022"></a><span class="lineno"><a class="code" href="classOrderedPair.html">   22</a></span>&#160;<span class="keyword">class </span><a class="code" href="classOrderedPair.html" title="A ordered pair contain two elements.">OrderedPair</a>{</div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00024"></a><span class="lineno"><a class="code" href="classOrderedPair.html#a43619a7c969484b2bb94491fdd5143ab">   24</a></span>&#160;        T <a class="code" href="classOrderedPair.html#a43619a7c969484b2bb94491fdd5143ab" title="the first element in the ordered pair">x</a>;</div>
<div class="line"><a name="l00025"></a><span class="lineno"><a class="code" href="classOrderedPair.html#ac7e84a12fd553555f6b70b7646e7bd5c">   25</a></span>&#160;        T <a class="code" href="classOrderedPair.html#ac7e84a12fd553555f6b70b7646e7bd5c" title="the second element in the ordered pair">y</a>;</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;</div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00034"></a><span class="lineno"><a class="code" href="classOrderedPair.html#a539350e684b1e9ce019c9c9ef9e0d3ff">   34</a></span>&#160;        <a class="code" href="classOrderedPair.html#a539350e684b1e9ce019c9c9ef9e0d3ff" title="Contructor.">OrderedPair</a>(){};</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;</div>
<div class="line"><a name="l00048"></a><span class="lineno"><a class="code" href="classOrderedPair.html#a722ba49eef8d336be25c65e3ac0b6faf">   48</a></span>&#160;        <a class="code" href="classOrderedPair.html#a722ba49eef8d336be25c65e3ac0b6faf" title="Construtor.">OrderedPair</a>(T a, T b){<a class="code" href="classOrderedPair.html#a43619a7c969484b2bb94491fdd5143ab" title="the first element in the ordered pair">x</a> = a; <a class="code" href="classOrderedPair.html#ac7e84a12fd553555f6b70b7646e7bd5c" title="the second element in the ordered pair">y</a> = b;};</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;</div>
<div class="line"><a name="l00055"></a><span class="lineno"><a class="code" href="classOrderedPair.html#a7779fb6f3019ee359ee1bd6c85d9592d">   55</a></span>&#160;        T <a class="code" href="classOrderedPair.html#a7779fb6f3019ee359ee1bd6c85d9592d" title="Retrieve the first element of the object.">getX</a>(){<span class="keywordflow">return</span> <a class="code" href="classOrderedPair.html#a43619a7c969484b2bb94491fdd5143ab" title="the first element in the ordered pair">x</a>;};</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;</div>
<div class="line"><a name="l00062"></a><span class="lineno"><a class="code" href="classOrderedPair.html#ab6eb70e66a29407a67aa9406fb32a01b">   62</a></span>&#160;        T <a class="code" href="classOrderedPair.html#ab6eb70e66a29407a67aa9406fb32a01b" title="Retrieve the second element of the object.">getY</a>(){<span class="keywordflow">return</span> <a class="code" href="classOrderedPair.html#ac7e84a12fd553555f6b70b7646e7bd5c" title="the second element in the ordered pair">y</a>;};</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;</div>
<div class="line"><a name="l00068"></a><span class="lineno"><a class="code" href="classOrderedPair.html#a3e1780645ddd6f44967446d8bbfb8052">   68</a></span>&#160;        <span class="keywordtype">void</span> <a class="code" href="classOrderedPair.html#a3e1780645ddd6f44967446d8bbfb8052" title="Change the first element of the object.">setX</a>(T a){<a class="code" href="classOrderedPair.html#a43619a7c969484b2bb94491fdd5143ab" title="the first element in the ordered pair">x</a> = a;};</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;</div>
<div class="line"><a name="l00074"></a><span class="lineno"><a class="code" href="classOrderedPair.html#ad34303ca35140243e8d97e62c0df526f">   74</a></span>&#160;        <span class="keywordtype">void</span> <a class="code" href="classOrderedPair.html#ad34303ca35140243e8d97e62c0df526f" title="Change the second element of the object.">setY</a>(T b){<a class="code" href="classOrderedPair.html#ac7e84a12fd553555f6b70b7646e7bd5c" title="the second element in the ordered pair">y</a> = b;};</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;</div>
<div class="line"><a name="l00086"></a><span class="lineno"><a class="code" href="classOrderedPair.html#abaedf0b9b5039f60ab499e374dcbd04f">   86</a></span>&#160;        <a class="code" href="classOrderedPair.html" title="A ordered pair contain two elements.">OrderedPair&lt;T&gt;</a> <a class="code" href="classOrderedPair.html#abaedf0b9b5039f60ab499e374dcbd04f" title="Operator =.">operator=</a>(<a class="code" href="classOrderedPair.html" title="A ordered pair contain two elements.">OrderedPair&lt;T&gt;</a> a){</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;                <a class="code" href="classOrderedPair.html#a43619a7c969484b2bb94491fdd5143ab" title="the first element in the ordered pair">x</a> = a.<a class="code" href="classOrderedPair.html#a43619a7c969484b2bb94491fdd5143ab" title="the first element in the ordered pair">x</a>;</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;                <a class="code" href="classOrderedPair.html#ac7e84a12fd553555f6b70b7646e7bd5c" title="the second element in the ordered pair">y</a> = a.<a class="code" href="classOrderedPair.html#ac7e84a12fd553555f6b70b7646e7bd5c" title="the second element in the ordered pair">y</a>;</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;                <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;        }</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;</div>
<div class="line"><a name="l00101"></a><span class="lineno"><a class="code" href="classOrderedPair.html#a9a09f552d9d7d1541faa94f295fcf9b1">  101</a></span>&#160;        <span class="keywordtype">bool</span> <a class="code" href="classOrderedPair.html#a9a09f552d9d7d1541faa94f295fcf9b1" title="Operator ==.">operator==</a>(<a class="code" href="classOrderedPair.html" title="A ordered pair contain two elements.">OrderedPair&lt;T&gt;</a> a){</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;                <span class="keywordflow">return</span> (<a class="code" href="classOrderedPair.html#a43619a7c969484b2bb94491fdd5143ab" title="the first element in the ordered pair">x</a> == a.<a class="code" href="classOrderedPair.html#a43619a7c969484b2bb94491fdd5143ab" title="the first element in the ordered pair">x</a>) &amp;&amp; (<a class="code" href="classOrderedPair.html#ac7e84a12fd553555f6b70b7646e7bd5c" title="the second element in the ordered pair">y</a> == a.<a class="code" href="classOrderedPair.html#ac7e84a12fd553555f6b70b7646e7bd5c" title="the second element in the ordered pair">y</a>);</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;        }</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;</div>
<div class="line"><a name="l00115"></a><span class="lineno"><a class="code" href="classOrderedPair.html#ac05b9e1e156e640206e063bbab049d9c">  115</a></span>&#160;        <span class="keywordtype">bool</span> <a class="code" href="classOrderedPair.html#ac05b9e1e156e640206e063bbab049d9c" title="Operator !=.">operator!=</a>(<a class="code" href="classOrderedPair.html" title="A ordered pair contain two elements.">OrderedPair&lt;T&gt;</a> a){</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;                <span class="keywordflow">return</span> !((<a class="code" href="classOrderedPair.html#a43619a7c969484b2bb94491fdd5143ab" title="the first element in the ordered pair">x</a> == a.<a class="code" href="classOrderedPair.html#a43619a7c969484b2bb94491fdd5143ab" title="the first element in the ordered pair">x</a>) &amp;&amp; (<a class="code" href="classOrderedPair.html#ac7e84a12fd553555f6b70b7646e7bd5c" title="the second element in the ordered pair">y</a> == a.<a class="code" href="classOrderedPair.html#ac7e84a12fd553555f6b70b7646e7bd5c" title="the second element in the ordered pair">y</a>));</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;        }</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;};</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a name="l00139"></a><span class="lineno"><a class="code" href="classOrderedBinaryRelation.html">  139</a></span>&#160;<span class="keyword">class </span><a class="code" href="classOrderedBinaryRelation.html" title="A Binary Relation with a specified order between to elements and two pairs of elements.">OrderedBinaryRelation</a>: <a class="code" href="classDirectlyAddressedSet.html" title="A static or dynamic set of elements with direct addressing.">DirectlyAddressedSet</a>&lt;OrderedPair&lt;T&gt; &gt;{</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;<span class="keyword">protected</span>:</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;</div>
<div class="line"><a name="l00147"></a><span class="lineno"><a class="code" href="classOrderedBinaryRelation.html#a355f6486643cdd45e409cc85b2153b76">  147</a></span>&#160;        <a class="code" href="classOrderedBinaryRelation.html#a355f6486643cdd45e409cc85b2153b76" title="Basic constructor.">OrderedBinaryRelation</a>(){};</div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classOrderedBinaryRelation.html#a2e3b79e896df2f798f5a909712976b75" title="Add a pair to the binary relation represented by this element.">add</a>(<a class="code" href="classOrderedPair.html" title="A ordered pair contain two elements.">OrderedPair&lt;T&gt;</a> par);</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <span class="keyword">remove</span>(<a class="code" href="classOrderedPair.html" title="A ordered pair contain two elements.">OrderedPair&lt;T&gt;</a> par);</div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;</div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classOrderedBinaryRelation.html#a2e3b79e896df2f798f5a909712976b75" title="Add a pair to the binary relation represented by this element.">add</a>(T x, T y) = 0;</div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;</div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <span class="keyword">remove</span>(T x, T y) = 0;</div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;</div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;        <span class="keyword">virtual</span> <a class="code" href="classDirectlyAddressedSet.html" title="A static or dynamic set of elements with direct addressing.">DirectlyAddressedSet&lt;T&gt;</a>* <a class="code" href="classOrderedBinaryRelation.html#a7723d1310f158eda930c410d9d223a5a" title="Return a set of the elements that make pair with the specified one in the relation where the specifie...">image</a>(T elem) = 0;</div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;</div>
<div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;        <span class="keyword">virtual</span> <a class="code" href="classDirectlyAddressedSet.html" title="A static or dynamic set of elements with direct addressing.">DirectlyAddressedSet&lt;T&gt;</a>* <a class="code" href="classOrderedBinaryRelation.html#af241d63d37d0710b0b4ebafd4ff2315a" title="Return a set of the elements that make pair with the specified one in the relation where the specifie...">inverse</a>(T elem) = 0;</div>
<div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;</div>
<div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classOrderedBinaryRelation.html#a6db00a84cc903947a2bacec6a7827a2f" title="Verify if the relation is transitive.">isTransitive</a>() = 0;</div>
<div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;</div>
<div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classOrderedBinaryRelation.html#a9b0d0099aa6b097d6e0017f0319ad89d" title="Verify if the relation is reflexive.">isReflexive</a>() = 0;</div>
<div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;</div>
<div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classOrderedBinaryRelation.html#a88ad457c8776cc80db0e2a7c10ec855b" title="Verify if the relation is empty.">isEmpty</a>() = 0;</div>
<div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;</div>
<div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classOrderedBinaryRelation.html#a3fccd9bbfaa26d7e99b9b768e9caaf81" title="Verify if the relation is simetric.">isSimetric</a>() = 0;</div>
<div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;</div>
<div class="line"><a name="l00312"></a><span class="lineno">  312</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classOrderedBinaryRelation.html#a28ea5ec4f747dee7220f930d261ddac4" title="Verify if the relation is antisimetric.">isAntiSimetric</a>() = 0;</div>
<div class="line"><a name="l00313"></a><span class="lineno">  313</span>&#160;</div>
<div class="line"><a name="l00325"></a><span class="lineno">  325</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">long</span> <a class="code" href="classOrderedBinaryRelation.html#a05b113dcdf2c4ee72f5220e56d43d717" title="The number of pairs in wich the specified element is the first element.">degreeIn</a>(T elem) = 0;</div>
<div class="line"><a name="l00326"></a><span class="lineno">  326</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">long</span> <a class="code" href="classOrderedBinaryRelation.html#a1608503da84d8a7a78afa222deae9060" title="The number of pairs in wich the specified element is the second element.">degreeOut</a>(T elem) = 0;</div>
<div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;};</div>
<div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160;</div>
<div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a name="l00341"></a><span class="lineno"><a class="code" href="classOrderedBinaryRelation.html#a2e3b79e896df2f798f5a909712976b75">  341</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classOrderedBinaryRelation.html#a2e3b79e896df2f798f5a909712976b75" title="Add a pair to the binary relation represented by this element.">OrderedBinaryRelation&lt;T&gt;::add</a>(<a class="code" href="classOrderedPair.html" title="A ordered pair contain two elements.">OrderedPair&lt;T&gt;</a> par){</div>
<div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;        <span class="keywordflow">return</span> add(par.<a class="code" href="classOrderedPair.html#a7779fb6f3019ee359ee1bd6c85d9592d" title="Retrieve the first element of the object.">getX</a>(), par.<a class="code" href="classOrderedPair.html#ab6eb70e66a29407a67aa9406fb32a01b" title="Retrieve the second element of the object.">getY</a>());</div>
<div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160;}</div>
<div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;</div>
<div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a name="l00346"></a><span class="lineno"><a class="code" href="classOrderedBinaryRelation.html#a48122847c1209dfb67ea784dda760573">  346</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classOrderedBinaryRelation.html#a48122847c1209dfb67ea784dda760573" title="Remove a pair to the binary relation represented by this element.">OrderedBinaryRelation&lt;T&gt;::remove</a>(<a class="code" href="classOrderedPair.html" title="A ordered pair contain two elements.">OrderedPair&lt;T&gt;</a> par){</div>
<div class="line"><a name="l00347"></a><span class="lineno">  347</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">remove</span>(par.<a class="code" href="classOrderedPair.html#a7779fb6f3019ee359ee1bd6c85d9592d" title="Retrieve the first element of the object.">getX</a>(), par.<a class="code" href="classOrderedPair.html#ab6eb70e66a29407a67aa9406fb32a01b" title="Retrieve the second element of the object.">getY</a>());</div>
<div class="line"><a name="l00348"></a><span class="lineno">  348</span>&#160;}</div>
<div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160;</div>
<div class="line"><a name="l00350"></a><span class="lineno">  350</span>&#160;</div>
<div class="line"><a name="l00351"></a><span class="lineno">  351</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* ORDEREDBINARYRELATION_H_ */</span><span class="preprocessor"></span></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Mon Nov 26 2012 17:06:45 for Data Structures for Sets and Graphs by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.1.1
</small></address>
</body>
</html>
